package com.lht.testDemo;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * @author Eric
 * @version 1.0
 * @date 2019-12-13
 */
public class Construct {

    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
        Constructor<Exception> con = Exception.class.getConstructor(String.class);
        Exception c = con.newInstance("demo");
    }


}

class AABB {

    private int code;

    private String msg;


    public AABB(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
